tools: init.d/Linux/xencommons: run script only when needed
authorOlaf Hering <olaf@aepfle.de>
Thu, 1 Dec 2011 18:27:42 +0000 (18:27 +0000)
committerOlaf Hering <olaf@aepfle.de>
Thu, 1 Dec 2011 18:27:42 +0000 (18:27 +0000)
commit48d95aee7d752efe3d9cdf2399e6a12b5a70e6f5
tree8ae4ea4b131a0aa038f2d694225eb5bb1972f541
parentb814bb097202ea188a5f6f3a91d337f7810d140e
tools: init.d/Linux/xencommons: run script only when needed

Currently xencommons prints an error that /proc/xen/capabilities does
not exist when started on a non-xen kernel.

Update the xencommons script to run only when needed:
- do not run if /proc/xen does not exist
- check if /proc/xen/capabilities exists before doing the grep for dom0

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/hotplug/Linux/init.d/xencommons